<?php

class Application_Form_Battle extends Zend_Form
{

 	public function init()
    {
        $nrOfRaids = new Zend_Form_Element_Select('numberOfRaids');
        $nrOfRaids->setLabel('How many raids to use in this attack ?')
                ->setMultiOptions(array('1'=>'1 raid', '2'=>'2 raids','3'=>'3 raids', '4'=>'4 raids', '5'=>'5 raids','6'=>'6 raids','7'=>'7 raids','8'=>'8 raids','9'=>'9 raids', '10'=>'10 raids'))
                ->setRequired(true)
                ->addValidator('NotEmpty', true);
                
        $attack = new Zend_Form_Element_Submit('attack');
        $attack->setLabel('ATTACK');
        
        $this->addElements(array(
                        $nrOfRaids,
                        $attack
                        ));          

        $this->setElementDecorators(array(
									'ViewHelper',
								     array( array('data' => 'HtmlTag'), 
									   	    array('tag' => 'span', 'id' => 'selectRaids')
										   ),
									 array('Label', 
									 		array('tag' => 'span', 'id' => 'question')
									 	   )
									 //,array(array('row' => 'HtmlTag'), array('tag' => 'p')) // this is to group 		togheter the 2 elements
									));
										  
		$attack->setDecorators(array('ViewHelper',
									    array( array('data' => 'HtmlTag'), 
									   	    array('tag' => 'span', 'id' => 'submitAttack')
										   )
									));                
        
        
		$this->setDecorators(array(
						'FormElements',
						array('HtmlTag', array('tag' => 'div', 'class'=> 'battleForm')),
						'Form'
						));
    }


}

